package com.ys.service.business.impl;

import com.ys.mapper.business.DiySqlMapper;
import com.ys.service.business.TpAmazonAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("tpAmazonAnalysisService")
public class TpAmazonAnalysisServiceImpl implements TpAmazonAnalysisService {
	
	@Autowired
	private DiySqlMapper diySqlMapper;

	/**
	 * 查询统计未入库的采购库存，根据店铺id
	 */
	@Override
	public List<Map<String, Object>> searchNoStorageCountByShopId(String shopId){

		return diySqlMapper.searchNoStorageCountByShopId(shopId);
	}

	/**
	 * 查询店铺跟踪表的合计数据
	 */
	@Override
	public List<Map<String, Object>> getTotalCountByAnalysis(Map<String, Object> searchInfo){
		return diySqlMapper.getTotalCountByAnalysis(searchInfo);
	}

	/**
	 * 查询店铺跟踪表的合计数据
	 */
	@Override
	public List<Map<String, Object>> getAnalysisTotalCountByOrderDaily(Map<String, Object> searchInfo){
		return diySqlMapper.getAnalysisTotalCountByOrderDaily(searchInfo);
	}

	/**
	 * 查询统计未入库的采购库存的合计数据
	 */
	@Override
	public List<Map<String, Object>> searchNoStorageTotalCount(String shopName,String companyName,String productCode,String productName){
		return diySqlMapper.searchNoStorageTotalCount(shopName,companyName,productCode,productName);
	}

	/**
	 * 查询仓储库存，根据商品code
	 */
	@Override
	public List<Map<String, Object>> searchStockControlByCode(List<String> list){
		return diySqlMapper.searchStockControlByCode(list);
	}

	/**
	 * 查询统计未入库的采购库存，根据商品code
	 */
	@Override
	public List<Map<String, Object>> searchNoStorageCountByShopCode(List<String> list){
		return diySqlMapper.searchNoStorageCountByShopCode(list);
	}

	/**
	 * 查询统计未入库的采购库存的合计
	 */
	@Override
	public List<Map<String, Object>> searchNoStorageCountByShopCodeTotal(Map<String, Object> searchInfo){
		return diySqlMapper.searchNoStorageCountByShopCodeTotal(searchInfo);
	}

	/**
	 * 查询仓储库存的合计
	 */
	@Override
	public List<Map<String, Object>> searchStockControlByCodeTotal(Map<String, Object> searchInfo){
		return diySqlMapper.searchStockControlByCodeTotal(searchInfo);
	}


	/**
	 * 查询仓储库存，根据所有商品code
	 */
	@Override
	public List<Map<String, Object>> searchStockControlByAllCode(){
		return diySqlMapper.searchStockControlByAllCode();
	}

	/**
	 * 查询统计未入库的采购库存，根据所有商品code
	 */
	@Override
	public List<Map<String, Object>> searchNoStorageCountByAllShopCode(){
		return diySqlMapper.searchNoStorageCountByAllShopCode();
	}
}
